﻿#include <iostream>

#include <thread>
#include <boost/asio.hpp>

#include "Receiver.h"

using namespace boost;

int main(int argc, char* argv[])
{
	asio::io_context context;
	asio::io_context::work worker(context);
	std::thread th([&context]() {context.run(); });

	try
	{
		Receiver receiver(context, asio::ip::address::from_string("192.168.100.112"), asio::ip::address::from_string("238.0.1.212"));
		th.join();
	}
	catch (std::exception& e)
	{
		std::cerr << e.what() << std::endl;
		return -1;
	}
	context.stop();
	return 0;
}